﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CRM.Database.Model.TechnicRequests>" %>
<%--<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CRM.Models.TechnicRequests>" %>--%>
<%@ Import Namespace="CRM.Resourses" %>

<%
    var visitsTypesCol = new CRM.Database.Model.VisitsTypesCollection();
%>

<% Html.DevExpress().GridView(settings =>
                    {
                        settings.Name = "gdVisitsTypes";
                        settings.KeyFieldName = "IdVisitsType";
                        settings.CallbackRouteValues = new { Controller = "TD", Action = "TechnicRequestsEquipmentsPartial", idRequest = Model.IdTechnicRequest };
                        settings.SettingsPager.PageSize = 20;
                        settings.Width = 243;

                        settings.Columns.Add(column =>
                        {
                            column.Caption = Resourses.VisitsType;
                            column.FieldName = "VisitsType";
                        });

                    }).Bind(visitsTypesCol.GetVisitsTypesListByRequestId(Model.IdTechnicRequest)).GetHtml();
                    //}).Bind(DB.GetVisitsTypesListByRequestId(Model.IdTechnicRequest)).GetHtml();
%>